<?php

use common\helpers\Html;
use common\widgets\grid\GridView;

/* @var $this \yii\web\View */
/* @var $searchModel \backend\modules\course\models\CourseSearch */
/* @var $dataProvider \yii\data\ActiveDataProvider */

$this->params['consoleactions'] = [
    [
        'label' => '<i class="fa fa-plus"></i> 添加教师',
        'url' => ['create'],
        'options' => ['class' => 'green', 'data-pjax' => 0]
    ]
];
?>

<?= $this->render('_fast', ['model' => $searchModel]); ?>

<?=

GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
        'id',
        'number',
        'name',
        'avatar:image',
        'gender:gender',
        'mobile',
        'grade_id',
        'scopes:list',
        'created_at:datetime',
        [
            'class' => 'common\widgets\grid\LabelColumn',
            'attribute' => 'status',
        ],
        [
            'class' => 'common\widgets\grid\ActionColumn',
            'template' => '{update}{delete}',
        ],
    ],
]);
?>
